<div class="right">
    <div class="active-list">
        <h3>活跃用户</h3>
        <ul>
            <?php foreach($activeUsers as $key => $val):?>
            <li><span <?php if ($key < 3):?>class="red"<?php endif;?>><?php echo $key + 1;?></span> <?php echo $val['username'];?></li>
            <?php endforeach;?>
        </ul>
    </div>
    <div class="active-list">
        <h3>热门帖子</h3>
        <ul>
            <?php foreach ($hotPosts as $key => $val):?>
                <li><span <?php if ($key < 3):?>class="red"<?php endif;?>><?php echo $key + 1;?></span> <a href="/index.php?c=post&a=detail&post_id=<?php echo $val['id'];?>"><?php echo $val['title'];?></a></li>
            <?php endforeach;?>
        </ul>
    </div>
</div>